package app.server.project.cloud.random.db.dao;

import app.server.project.cloud.random.db.entity.DevStatusEntity;
import app.server.project.cloud.random.db.mapper.DevStatusMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Administrator
 * @description 针对表【user_info(用户信息表)】的数据库操作Service实现
 * @createDate 2025-01-16 15:25:22
 */
@Repository
public class DevStatusDao extends ServiceImpl<DevStatusMapper, DevStatusEntity> {


    @Cacheable(cacheNames = "app.server.project.main.service.db.dao.DevStatusDao",key = "#devId")
    public List<DevStatusEntity> getData(long devId) {
         var ret=this.lambdaQuery().eq(DevStatusEntity::getDevId,devId)
                .list();
         ret.forEach(v->{
             v.setSynDb(true);
         });
         return ret;
    }
}




